using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
    public class Singleton<T> where T : new()
    {
        private static T? _instance;

        public static T Instance
        {
            get => (Equals(_instance, default(T)) ? (_instance = new T()) : _instance) ?? (_instance = new T());
        }
    }
}
